<?php

class Plugin_Init extends Zend_Controller_Plugin_Abstract {

    public function routeShutdown(Zend_Controller_Request_Abstract $request)
    {
        $plugin = "Plugin_" . ucfirst($request->getModuleName());
        if (!class_exists($plugin)) {
            $plugin = "Plugin_Default";
        }
        Zend_Controller_Front::getInstance()->registerPlugin(new $plugin);
    }

}